﻿<!--
  
   NewBonusWindow.xaml
  
   Copyright (c) 2007 Mike Strobel
  
   This source code is subject to the terms of the Microsoft Reciprocal License (Ms-RL).
   For details, see <http://www.opensource.org/licenses/ms-rl.html>.
  
   All other rights reserved.
  
  -->
<Window x:Class="Supremacy.Editor.NewBonusWindow"
        xmlns="http://schemas.microsoft.com/netfx/2007/xaml/presentation"
        xmlns:s="clr-namespace:Supremacy.Client;assembly=SupremacyWPF"
        xmlns:local="clr-namespace:Supremacy.Editor"
        xmlns:econ="clr-namespace:Supremacy.Economy;assembly=SupremacyCore"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Add Bonus"
        Width="480"
        SizeToContent="Height" 
        ResizeMode="NoResize"
        WindowStyle="ThreeDBorderWindow"
        WindowStartupLocation="CenterOwner">
    
    <Grid Margin="6">
      <Grid.ColumnDefinitions>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="*"/>
        <ColumnDefinition Width="Auto"/>
        <ColumnDefinition Width="Auto"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
        <RowDefinition Height="Auto"/>
        <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>

      <Label Grid.Column="0"
             Grid.Row="0"
             Content="Bonus Type:"/>

      <ComboBox x:Name="BonusTypeList"
                Grid.Column="1"
                Grid.Row="0"
                IsEditable="False"
                HorizontalAlignment="Stretch">
        <ComboBox.Resources>
          <DataTemplate DataType="{x:Type econ:BonusType}">
            <TextBlock Text="{Binding Converter={StaticResource BonusTypeConverter}}"/>
          </DataTemplate>
        </ComboBox.Resources>
      </ComboBox>

      <Label Grid.Column="2"
             Grid.Row="0"
             Content="Amount:"/>

      <TextBox x:Name="AmountText"
               Grid.Column="3"
               Grid.Row="0"
               Width="64"/>

      <StackPanel Grid.Column="0"
                  Grid.ColumnSpan="4"
                  Grid.Row="1"
                  Margin="0,6,0,0"
                  Orientation="Horizontal"
                  HorizontalAlignment="Center">
        <Button x:Name="AcceptButton"
                Content="Accept"
                IsDefault="True"
                Margin="0,0,3,0"
                Padding="12,2,12,2"/>
        <Button x:Name="CancelButton"
                Content="Cancel"
                IsCancel="True"
                Margin="3,0,0,0"
                Padding="12,2,12,2"/>
      </StackPanel>
    </Grid>
  
</Window>
